﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
// -----------------------------------------------------------------------
// <copyright file="$safeitemrootname$.cs" company="$registeredorganization$">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------
namespace MenuGame2DXNA
{
    /// <summary>
    /// 
    /// </summary>
    public class Cell : VisibleGameEntity
    {


        /// <summary>
        /// Initializes a new instance of the <see cref="Cell"/> class.
        /// </summary>
        /// <param name="_Content">Content of the _.</param>
        /// <param name="strTexture">The STR texture.</param>
        /// <param name="_position">The _position.</param>
        /// <param name="_size">The _size.</param>
        public Cell(ContentManager _Content, string strTexture, Vector2 _position, Vector2 _size)
        {
           
            this.Size = _size;
            this.TopLeft = _position;
            if (strTexture != "")
            {

                this.nObjectVisible = 1;
                Texture2D[] temTexture;
                temTexture = new Texture2D[1];
                temTexture[0] = _Content.Load<Texture2D>(strTexture);

                Sprite temSprite = new AutomatedSprite(temTexture, TopLeft);
                temSprite.Size = _size;
                ObjectVisible = new List<Sprite>();
                ObjectVisible.Add(temSprite);
            }
            else
                nObjectVisible = 0;
           
        }
    }
}
